From: Giovanni Campagna Date: Wed, 29 Jan 2014 21:28:17 +0000 (+0100) Subject: NMWirelessDialog: request a scan when there are no visible access points X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2839 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7f1e420a0acde270acb24ac812e0c9b7c394eaaa;p=gnome-shell.git NMWirelessDialog: request a scan when there are no visible access points Ideally, we should keep scanning while the dialog is open, and stop (or reduce the frequency) when it's closed. Forcing a new scan when the dialog is opened empty is a close approximation and increases the probability that the user will find the AP he needs. https://bugzilla.gnome.org/show_bug.cgi?id=709128 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index ab67e820f..8962ced6c 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -669,6 +669,11 @@ const NMWirelessDialog = new Lang.Class({ this._selectedNetwork = null; this._activeApChanged(); this._updateSensitivity(); + + if (accessPoints.length == 0) { + /* If there are no visible access points, request a scan */ + this._device.request_scan_simple(null); + } }, destroy: function() {